﻿using System;

namespace Landsat8_LSTWindow
{
    public static class AtmCorrParamExtentions
    {
        public static string ToFormUrlEncodedString(this AtmCorrParam atm)
        {
            return string.Format("year={0}&month={1}&day={2}&hour={3}&minute={4}&thelat={5}&thelong={6}0&profile_option={7}&stdatm_option={8}&L57_option={9}&altitude={10}&pressure={11}&temperature={12}&rel_humid={13}&user_email={14}",
                atm.year, atm.month, atm.day, atm.hour, atm.minute,
                atm.thelat, atm.thelong,
                atm.profile_option,
                atm.stdatm_option,
                atm.L57_option,
                atm.altitude == 0? "": atm.altitude.ToString(), atm.pressure == 0 ? "" : atm.pressure.ToString(), 
                atm.temperature == 0 ? "" : atm.temperature.ToString(), atm.rel_humid == 0 ? "" : atm.rel_humid.ToString(),
                Uri.EscapeDataString(atm.user_email));
        }
    }
}
